﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Quanlythuvien
{
    public partial class frmMain : Form
    {
        public frmMain()
        {
            InitializeComponent();
        }

        private void mnuExit_Click(object sender, EventArgs e)
        {
            DialogResult rs = MessageBox.Show(this, "Bạn có thực sự muốn thoát chương trình không ?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            if (rs == DialogResult.Yes)
                Application.Exit();
        }

        private void mnuHDSudung_Click(object sender, EventArgs e)
        {
            
        }

        private void mnuThongtin_Click(object sender, EventArgs e)
        {
            frmThongTinPM frm = new frmThongTinPM();
            frm.Show();
        }

        private void thoátToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmLoginManager lm = new frmLoginManager();
            lm.Show();
        }

        private void mnuBanQuyen_Click(object sender, EventArgs e)
        {
            frmQuanLyBanQuyen bq = new frmQuanLyBanQuyen();
            bq.Show();
        }

        private void mnuQLTG_Click(object sender, EventArgs e)
        {
            frmDocGia frmdg = new frmDocGia();
            frmdg.Show();
        }

        [STAThread]
        static void Main()
        {
            Application.Run(new frmLogin());
        }

        private void mnuDangXuat_Click(object sender, EventArgs e)
        {
            DialogResult rs = MessageBox.Show(this, "Bạn có muốn thoát hay không?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
            if (rs == DialogResult.Yes)
            {
                this.Close();
                frmLogin lg = new frmLogin();
                lg.Show();
            }
        }

        private void mnuMuon_Click(object sender, EventArgs e)
        {
            frmMuonSach frmms = new frmMuonSach();
            frmms.Show();
        }

        private void mnuTra_Click(object sender, EventArgs e)
        {
            frmTraSach frmts = new frmTraSach();
            frmts.Show();
        }

        private void mnuTimSach_Click(object sender, EventArgs e)
        {
            frmTimSach frmtsh = new frmTimSach();
            frmtsh.Show();
        }

        private void mnuTimSachMuon_Click(object sender, EventArgs e)
        {
            frmMuonSach frmms = new frmMuonSach();
            frmms.Show();
        }

        private void mnuTimTacGia_Click(object sender, EventArgs e)
        {
            frmTimDocGia frmtdg = new frmTimDocGia();
            frmtdg.Show();
        }   
    }
}
